package org.example.source;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

import java.util.ArrayList;
import java.util.Arrays;

public class CollectionDemo {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

        //DataStreamSource<Integer> source = env.fromCollection(Arrays.asList(1, 2, 3));

        DataStreamSource<Integer> source1 = env.fromElements(1, 2, 3);

        source1.print();
        env.execute("source demo");
    }
}
